package com.yhgarden.bbs.model.helper;

import com.yhgarden.bbs.entity.vo.systemUser.SystemUserRolesVo;
import com.yhgarden.bbs.model.constants.YhbbsConstants;

import javax.servlet.http.HttpSession;

public class LoginHelper {

    public static boolean adminLogin(HttpSession session, SystemUserRolesVo systemUser)  {
        session.setAttribute(YhbbsConstants.SYSTEM_USER_SESSION_KEY, systemUser);
        return true;
    }

    public static void adminLogout(HttpSession session){
        session.removeAttribute(YhbbsConstants.SYSTEM_USER_SESSION_KEY);
    }


}
